//
//  UIView+Extension.h
//
//  Created by 张磊 on 14-11-14.
//  Copyright (c) 2014年 com.zixue101.www. All rights reserved.
//


#import <UIKit/UIKit.h>

@interface UIView (Extension)

@property (nonatomic,assign) CGFloat x;
@property (nonatomic,assign) CGFloat y;
@property (nonatomic,assign) CGFloat centerX;
@property (nonatomic,assign) CGFloat centerY;
@property (nonatomic,assign) CGFloat width;
@property (nonatomic,assign) CGFloat height;
@property (nonatomic,assign) CGSize size;
@property (nonatomic, assign) CGFloat rightX;
@property (nonatomic, assign) CGFloat bottomY;

- (void)setTopMaskLayerWithCornerRadius:(CGFloat)cornerRadius;

- (void)setBottomMaskLayerWithCornerRadius:(CGFloat)cornerRadius;

- (void)setLeftMaskLayerWithCornerRadius:(CGFloat)cornerRadius;

- (void)setRightMaskLayerWithCornerRadius:(CGFloat)cornerRadius;

/**设置圆角*/
- (void)setLayerCornerRadius1;
- (void)setLayerCornerRadius3;
- (void)setLayerCornerRadius5;
- (void)setLayerCornerRadius:(CGFloat)cornerRadius;

/// 添加圆角虚线边框
/// @param strokeColor 边框颜色
/// @param lineWidth 边框宽度
/// @param cornerRadius 圆角
/// @param lineDashPattern [线宽,线间距]
- (void)setLayerDottedLineWithStrokeColor:(UIColor *)strokeColor lineWidth:(CGFloat)lineWidth cornerRadius:(CGFloat)cornerRadius lineDashPattern:(NSArray<NSNumber *>*)lineDashPattern;

- (void)removeAllConstraints;

@end
